using System;
using System.Collections.Generic;
using System.Text;
using MindFactorial.LaunchPoint.Runtime;
using MindFactorial.LaunchPoint.Common;

namespace MindFactorial.LaunchPoint.Console.Library
{
    /// <summary>
    /// Represents an interface to a plugin for the console
    /// </summary>
    public interface IConsolePlugIn : IConsoleObject
    {
        /// <summary>
        /// Gets the MessagingPipeline object for braodcasting messages down to the LaunchPoint Runtime
        /// </summary>
        PluginMessagingPipeline MessagingPipeline { get;}

        /// <summary>
        /// Gets the runtime context for access to the hosting LaunchPoint runtime
        /// </summary>
        LaunchPointRuntimeContext RuntimeContext { get;}
        /// <summary>
        /// gets the unique name of the plugin
        /// </summary>
        string Name { get;}

        /// <summary>
        /// gets the label (found in the registration area) of the plugin
        /// </summary>
        string Label { get;}

        /// <summary>
        /// dispatches messages to all participating components within a plugin
        /// </summary>        
        /// <param name="filter"></param>
        /// <param name="message"></param>
        void RouteMessage<T>(string filter, T message);

        /// <summary>
        /// shows a waiting interface
        /// </summary>
        void ShowWaitUI();

        /// <summary>
        /// hides the waiting interface
        /// </summary>
        void HideWaitUI();

        /// <summary>
        /// shows a waiting interface
        /// </summary>
        void ShowWaitUI(object wait_context);

        /// <summary>
        /// hides the waiting interface
        /// </summary>
        void HideWaitUI(object wait_context);
    }
}
